package com.cqut.service.impl;

import com.cqut.VO.checkTask.CheckTaskListVO;
import com.cqut.mapper.CheckTaskMapper;
import com.cqut.service.CheckTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 批阅作业 服务实现类
 * </p>
 *
 * @author 冯永龙
 * @since 2021-06-15
 */
@Service
public class CheckTaskServiceImpl implements CheckTaskService {
    @Autowired
    private CheckTaskMapper checkTaskMapper;

    @Override
    public List<CheckTaskListVO> getCheckTaskList(String taskId) {
        return checkTaskMapper.getCheckTaskList(taskId);
    }

    @Override
    public boolean giveTaskScore(String taskId, Integer userId, String score) {
        return checkTaskMapper.giveTaskScore(taskId, userId, score) == 1;
    }
}
